package net.mimai.vultrue.demo;

import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import net.mimai.vultrue.framework.base.vo.GenericResponse;
import net.mimai.vultrue.framework.utils.FrameworkUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/mmv/demo")
@Api(value="Demo接口",tags="Demo接口控制器")
public class DemoController {


    private Logger logger = LoggerFactory.getLogger(DemoController.class);


    @Operation(summary = "测试接口1",  description= "测试接口1")
    @ApiResponse(responseCode = "200", description = "测试接口1")
    @PostMapping("/t1")
    public GenericResponse t1(){
        logger.info("api t1 is OK");
        return FrameworkUtils.buildSuccRet();
    }

    @Operation(summary = "测试接口2",  description= "测试接口2")
    @ApiResponse(responseCode = "200", description = "测试接口2")
    @PostMapping("/t2")
    public GenericResponse t2(){
        logger.info("api t2 is OK");
        return FrameworkUtils.buildSuccRet();
    }

}
